/*
 * @Description: 
 * @Author: changqing
 * @Date: 2021-05-30 23:34:26
 * @LastEditTime: 2021-06-08 16:31:19
 * @LastEditors: changqing
 * @Usage: 
 */
import seq from './seq'
import './models/index'

(async () => { // 连接测试
  try {
    await seq.authenticate()
    console.log('Connection has been established successfully.')
  } catch (error) {
    console.error('Unable to connect to the database:', error)
  } 
})()

// 同步更新model
;(async () => { // model配置修改后 执行sync进行更新同步
  await seq.sync({ alter: true })
  console.log('sync ok')
})()